package com.dyit.springcloud.feign.controller;

import com.dyit.springcloud.common.dto.HttpResp;
import com.dyit.springcloud.feign.api.FeignApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/feign")
@Api("feign访问服务接口")
public class FeignController {
    @Autowired
    private FeignApi api;

    @ApiOperation("feign负载均衡")
    @GetMapping("/findAll")
    public HttpResp findAll(){
        return api.feignFindAll();
    }
}
